<%--
  Created by IntelliJ IDEA.
  User: caojian
  Date: 2017/3/10
  Time: 下午5:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<div class="ui fixed inverted menu">
    <div class="ui container">
        <security:authorize access="hasRole('ROLE_SALE')">
            <a class="header item">
                <img class="logo" src="${pageContext.request.contextPath}/images/logo.jpg">掌上小卖部（卖家）
            </a>
            <a href="${pageContext.request.contextPath}/sale/category" class="item">分类列表</a>
            <a href="${pageContext.request.contextPath}/sale/goods" class="item">商品列表</a>
            <a href="${pageContext.request.contextPath}/sale/xiaoqu" class="item">服务小区</a>
            <a href="${pageContext.request.contextPath}/sale/orders" class="item">订单列表</a>
            <a href="${pageContext.request.contextPath}/sale/evaluate" class="item">评价列表</a>
        </security:authorize>
        <security:authorize access="hasRole('ROLE_ADMIN')">
            <a class="header item">
                <img class="logo" src="${pageContext.request.contextPath}/images/logo.jpg">掌上小卖部（管理员）
            </a>
            <div class="ui simple dropdown item">
                <label>用户管理</label>
                <i class="dropdown icon"></i>
                <div class="menu">
                    <a href="${pageContext.request.contextPath}/sale" class="item">卖家管理</a>
                    <a href="${pageContext.request.contextPath}/userBuy" class="item">买家管理</a>
                </div>
            </div>
            <a href="${pageContext.request.contextPath}/xiaoqu" class="item">小区管理</a>
            <a href="${pageContext.request.contextPath}/auth" class="item">认证列表</a>
            <a href="${pageContext.request.contextPath}/blacklist" class="item">黑名单列表</a>
        </security:authorize>
        <div class="ui simple dropdown right item">
            <label id="JS-email"><security:authentication property="name"/></label>
            <i class="dropdown icon"></i>
            <div class="menu">
                <security:authorize access="hasRole('ROLE_SALE')">
                    <a class="item" href="${pageContext.request.contextPath}/sale/own"><i class="user icon"></i>我的信息</a>
                </security:authorize>
                <security:authorize access="hasRole('ROLE_SALE')">
                    <a class="item" href="${pageContext.request.contextPath}/sale/own/modifyPsd">
                        <i class="edit icon"></i>修改密码
                    </a>
                </security:authorize>
                <a id="JS-logout" class="item"><i
                        class="sign out icon"></i>退出</a>
                <form action="/logout" method="post" id="logout_form">
                </form>
            </div>
        </div>
    </div>
</div>

